package model.doe;

public class FresnelAnnular extends Fresnel {

	private double step;
	private double rad;

	public FresnelAnnular(double rad, double angle, double f, double wl,
			double step) {
		Cos = Math.cos(angle * Math.PI / 180);
		super.fresnelA_init(rad, f, wl, Cos);

		this.step = step;
		this.rad = rad;

		widthPointsNumber = (int) (2*rad / step);
		heightPointsNumber = (int) (2*rad / step);
	}

	public double calculate(double u, double v) {
		return super.fresnelA(u, v);
	}
	
	@Override
	public double run(int i, int j) {		
		return calculate(step * i, step * j);
	}	
}
